﻿using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace RaidMasterRogue
{
    public partial class RMRogueForm1 : Form
    {
        public RMRogueForm1()
        {
            InitializeComponent();
        }

        private void RMRogueForm1_Load(object sender, EventArgs e)
        {
            RMRogueSettings.Instance.Load();

            Mobs.Value = new decimal(RMRogueSettings.Instance.Mobs);
            DC.Checked = RMRogueSettings.Instance.DC;
            RCKLS.Checked = RMRogueSettings.Instance.RCKLS;
            T1.Checked = RMRogueSettings.Instance.T1;
            T2.Checked = RMRogueSettings.Instance.T2;
            CHRG.Checked = RMRogueSettings.Instance.CHRG;
            HL.Checked = RMRogueSettings.Instance.HL;
            BS.Checked = RMRogueSettings.Instance.BS;
            SS.Checked = RMRogueSettings.Instance.SS;
            IR.Checked = RMRogueSettings.Instance.IR;
            LB.Checked = RMRogueSettings.Instance.LB;
            RS.Checked = RMRogueSettings.Instance.RS;
            AOE.Checked = RMRogueSettings.Instance.AOE;
            Party.Checked = RMRogueSettings.Instance.Party;
            DSHC.Checked = RMRogueSettings.Instance.DSHC;
            DSLFR.Checked = RMRogueSettings.Instance.DSLFR;
            DSNOR.Checked = RMRogueSettings.Instance.DSNOR;
        }
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.thebuddyforum.com/reputation.php?do=addreputation&p=422915");
            linkLabel1.LinkVisited = true;
        }
        private void linkLabel2_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://www.thebuddyforum.com/newreply.php?p=423850&noquote=1");
            linkLabel2.LinkVisited = true;
        }
        private void Mobs_ValueChanged_1(object sender, EventArgs e)
        {
            RMRogueSettings.Instance.Mobs = (int)Mobs.Value;
        }
        private void DC_CheckedChanged_1(object sender, EventArgs e)
        {
            if (DC.Checked == true)
            {
                RMRogueSettings.Instance.DC = true;
            }
            else
            {
                RMRogueSettings.Instance.DC = false;
            }
        }
        private void RCKLS_CheckedChanged_1(object sender, EventArgs e)
        {
            if (RCKLS.Checked == true)
            {
                RMRogueSettings.Instance.RCKLS = true;
            }
            else
            {
                RMRogueSettings.Instance.RCKLS = false;
            }
        }
        private void T1_CheckedChanged_1(object sender, EventArgs e)
        {
            if (T1.Checked == true)
            {
                RMRogueSettings.Instance.T1 = true;
            }
            else
            {
                RMRogueSettings.Instance.T1 = false;
            }
        }
        private void T2_CheckedChanged(object sender, EventArgs e)
        {
            if (T2.Checked == true)
            {
                RMRogueSettings.Instance.T2 = true;
            }
            else
            {
                RMRogueSettings.Instance.T2 = false;
            }
        }
        private void CHRG_CheckedChanged_1(object sender, EventArgs e)
        {
            if (CHRG.Checked == true)
            {
                RMRogueSettings.Instance.CHRG = true;
            }
            else
            {
                RMRogueSettings.Instance.CHRG = false;
            }
        }
        private void HL_CheckedChanged_1(object sender, EventArgs e)
        {
            if (HL.Checked == true)
            {
                RMRogueSettings.Instance.HL = true;
            }
            else
            {
                RMRogueSettings.Instance.HL = false;
            }
        }
        private void BS_CheckedChanged_1(object sender, EventArgs e)
        {
            if (BS.Checked == true)
            {
                RMRogueSettings.Instance.BS = true;
            }
            else
            {
                RMRogueSettings.Instance.BS = false;
            }
        }
        private void SS_CheckedChanged_1(object sender, EventArgs e)
        {
            if (SS.Checked == true)
            {
                RMRogueSettings.Instance.SS = true;
            }
            else
            {
                RMRogueSettings.Instance.SS = false;
            }
        }
        private void IR_CheckedChanged_1(object sender, EventArgs e)
        {
            if (IR.Checked == true)
            {
                RMRogueSettings.Instance.IR = true;
            }
            else
            {
                RMRogueSettings.Instance.IR = false;
            }
        }
        private void LB_CheckedChanged_1(object sender, EventArgs e)
        {
            if (LB.Checked == true)
            {
                RMRogueSettings.Instance.LB = true;
            }
            else
            {
                RMRogueSettings.Instance.LB = false;
            }
        }
        private void RS_CheckedChanged_1(object sender, EventArgs e)
        {
            if (RS.Checked == true)
            {
                RMRogueSettings.Instance.RS = true;
            }
            else
            {
                RMRogueSettings.Instance.RS = false;
            }
        }
        private void AOE_CheckedChanged_1(object sender, EventArgs e)
        {
            if (AOE.Checked == true)
            {
                RMRogueSettings.Instance.AOE = true;
            }
            else
            {
                RMRogueSettings.Instance.AOE = false;
            }
        }
        private void Party_CheckedChanged_1(object sender, EventArgs e)
        {
            if (Party.Checked == true)
            {
                RMRogueSettings.Instance.Party = true;
            }
            else
            {
                RMRogueSettings.Instance.Party = false;
            }
        }
        private void DSHC_CheckedChanged_1(object sender, EventArgs e)
        {
            if (DSHC.Checked == true)
            {
                RMRogueSettings.Instance.DSHC = true;
            }
            else
            {
                RMRogueSettings.Instance.DSHC = false;
            }
        }
        private void DSLFR_CheckedChanged_1(object sender, EventArgs e)
        {
            if (DSLFR.Checked == true)
            {
                RMRogueSettings.Instance.DSLFR = true;
            }
            else
            {
                RMRogueSettings.Instance.DSLFR = false;
            }
        }
        private void DSNOR_CheckedChanged_1(object sender, EventArgs e)
        {
            if (DSNOR.Checked == true)
            {
                RMRogueSettings.Instance.DSNOR = true;
            }
            else
            {
                RMRogueSettings.Instance.DSNOR = false;
            }
        }
        private void SaveButton_Click_1(object sender, EventArgs e)
        {
            RMRogueSettings.Instance.Save();
            Logging.Write("Configuration Saved");
            Close();
        }

    }
}
